<?php $this->load->view('admin/public/head.html', array(
    'css' => array(
        'assets/admin/css/admin/common.css'
    ))
);
?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper" ng-controller="base-home-index">
    <!-- Main content -->
    <section class="content">

        <div class="row base-admin-top">
            <div class="col-md-4">
                欢迎回来： <strong>Eden</strong>
            </div>
        </div>

        <div class="row base-admin-box">
            <div class="col-md-4 col-sm-6 col-xs-12">
                <h3><i class="fa fa-bar-chart"></i> 订单数量</h3>
                <p>今日订单 <a href="#"><?=$order['today']?></a> &nbsp;&nbsp;&nbsp;&nbsp; 历史订单 <a href="#"><?=$order['total']?></a></p>
            </div>

            <div class="col-md-4 col-sm-6 col-xs-12">
                <div class="pull-left">
                    <h4>本月交易额</h4>
                    <p class="base-money"><?=$amount?> 元</p>
                </div>
                <!--
                <div class="pull-left" style="margin-left: 20px;">
                    <button class="btn btn-primary">申请提款</button>
                </div>
                -->
            </div>

            <div class="col-md-4 col-sm-6 col-xs-12">
                <h2><i class="fa fa-navicon"></i> 基地数据</h2>
                <p class="summary-data">商品数量 <a href="#"><?=$summary['goods']?></a> &nbsp;&nbsp;&nbsp;&nbsp; 管理员数量 <a href="#"><?=$summary['user']?></a></p>
            </div>
        </div>

        <?php if(!empty($bill)):?>
        <div class="row" style="margin-left: 30px;">
            <h3 style="font-size: 16px; color: #333333;">对账单状态</h3>
            <div style="width: 500px; height: 130px; border: 1px solid #e3e3e3; background: #f7f7f7; position: relative;">
                <?php if($bill['status'] == 6):?>
                <div class="comp"></div>
                <?php else:?>
                <div class="wait"></div>
                <?php endif;?>
                <ul style="margin: 25px 0 0 0; float: left; height: 80px; list-style:none; padding-left: 40px; width: 70%; border-right: 1px solid #e3e3e3;">
                    <li>订单数量：<strong><?=$bill['count']?></strong></li>
                    <li>交易金额：<strong style="color: red;"><?=money_format('%i', $bill['total'] / 100)?></strong></li>
                    <li>扣款金额：<strong style="color: green;">-<?=money_format('%i', ($bill['refund'] + $bill['delivery']) / 100)?></strong></li>
                    <li>应得金额：<strong style="color: orange;">+<?=money_format('%i', ($bill['total'] - $bill['refund'] - $bill['delivery']) / 100)?></strong></li>
                </ul>
                <div style="float: right; width: 28%; line-height: 130px; text-align: center">
                    <a href="money/history/index">历史对账单&gt;</a>
                </div>
            </div>
        </div>
        <?php else: ?>
        <div class="row" style="margin-left: 30px;">
            <h3 style="font-size: 16px; color: #333333;">对账单状态</h3>
            <a href="/money/purchaser/index" class="col-md-5" style="display: block; height: 130px; cursor: pointer; text-align: center; border: 1px dotted #e3e3e3;">
                <p style="margin-top: 25px; text-align: center; font-size: 18px; color: #888888;">添加对账申请</p>
                <i class="fa fa-plus-circle" style="font-size: 40px; color: #888888;"></i>
            </a>
        </div>
        <?php endif;?>

    </section>
    <!-- /.content -->
</div>
<!-- /.content-wrapper -->
<?php $this->load->view('admin/public/foot.html', array(
    'js' => array(
        'assets/admin/js/home/base.js'
    )
));
?>
